agents.anac.y2011.TheNegotiator
Class TimeManager

java.lang.Object
  extended by agents.anac.y2011.TheNegotiator.TimeManager

public class TimeManager
extends java.lang.Object

The TimeManager class is used for time-related functions.

Author:
Alex Dirkzwager, Mark Hendrikx, Julian de Ruiter

Constructor Summary
TimeManager(Timeline timeline, double discount, BidsCollection bidsCollection)
          Creates a TimeManager-object which stores the timeline of the negotiation.
 
Method Summary
 void calculateEndPhases()
          Calculates the time which should be spend on each phase based on the distribution of the utilities of the bids.
 void calculatePropArray()
          Calculate how many possible bids are within a certain threshold interval.
 int getMovesLeft()
           
 int getPhase(double time)
          Returns the current phase of the negotiation.
 double getThreshold(double time)
          Returns the time dependent threshold which specifies how good a bid of an opponent should be to be accepted.
 double getTime()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeManager

public TimeManager(Timeline timeline,
                   double discount,
                   BidsCollection bidsCollection)
Creates a TimeManager-object which stores the timeline of the negotiation.

Parameters:
timeline - of the negotiation
Method Detail

getPhase

public int getPhase(double time)
Returns the current phase of the negotiation.

Returns:
phase of the negotiation

getThreshold

public double getThreshold(double time)
Returns the time dependent threshold which specifies how good a bid of an opponent should be to be accepted. This threshold is also used as a minimum for the utility of the bid of our agent.

Returns:
threshold

getMovesLeft

public int getMovesLeft()

calculatePropArray

public void calculatePropArray()
Calculate how many possible bids are within a certain threshold interval. This is done for all the bins (phases).


calculateEndPhases

public void calculateEndPhases()
Calculates the time which should be spend on each phase based on the distribution of the utilities of the bids.


getTime

public double getTime()